package org.jetlinks.protocol.official.mqtt.down.zigbeeGateway;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.jetlinks.core.message.function.FunctionInvokeMessage;
import org.jetlinks.protocol.official.TopicPayload;
import org.jetlinks.protocol.official.mqtt.down.zigbeeGateway.handler.*;

import java.util.function.BiFunction;

/**
 * @Author bingzhong
 * @Date 2025/1/2 16:44
 * @Description
 */
@Getter
@AllArgsConstructor
public enum ZigbeeGatewayFunctionIdEnum {


    /**
     * 设置网关mqtt指向
     */
    ZigbeeGateway_MqttDirect(ZigbeeGatewayMqttDirectSetting::encode),
    /**
     * 查询网关系统参数
     */
    ZigbeeGateway_QuerySystem(ZigbeeGatewayQuerySystem::encode),
    /**
     * 控制插座
     */
    ZigbeeGateway_ControlSocket(ZigbeeGatewayControlSocket::encode),
    /**
     * 打开网关网络设置
     */
    ZigbeeGateway_OpenNetWork(ZigbeeGatewayOpenNetWork::encode),
    /**
     * ota 远程升级
     */
    ZigbeeGateway_OTAUpgrade(ZigbeeGatewayOTAUpgrade::encode),
    /**
     * 查询网关子设备列表
     */
    ZigbeeGateway_QueryDeviceList(ZigbeeGatewayQueryDeviceList::encode),
    /**
     * 窗帘开关控制
     */
    ZigbeeGateway_CurtainControl(ZigbeeGatewayCurtainControl::encode);

    private final BiFunction<FunctionInvokeMessage,String, TopicPayload> function;

}
